package com.weme.mine.viewmode

import androidx.lifecycle.MutableLiveData
import com.weme.common.base.BaseViewModel
import com.weme.common.network.NetWorkUrl
import dev.kratos.api.user_server.v1.*

class UserInfoViewMode:BaseViewModel() {
    val clickBigImgLiveData = MutableLiveData<Any>()
    var isFollow = false
    var userId = 0L

    fun getMseeageList(req: GetUserInfoRequest) {
        val reqByte = req.toByteArray()
        sendNetworkRequest(reqByte, NetWorkUrl.GetUserInfoActivity)
    }
    fun  getAlubm(req: GetAlbumRequest){
        sendNetworkRequest(req.toByteArray(),
            NetWorkUrl.UserInfoAlbum )
    }

//    fun getGiftList(){
//        sendNetworkRequest(GetGiftListRequest.newBuilder().build().toByteArray(),
//            NetWorkUrl.UserInfoAlbum )
//    }

    fun  setFollowApi(req: FollowRequest){
        sendNetworkRequest(req.toByteArray(),
            NetWorkUrl.Follow )
    }
    fun  setUnFollowApi(req: UnFollowRequest){
        sendNetworkRequest(req.toByteArray(),
            NetWorkUrl.UnFollow )
    }

    fun sendGift(req: SendGiftRequest) {
        sendNetworkRequest(req.toByteArray(),
            NetWorkUrl.SendGiftUserInfo )
    }


    fun getUserMeInfo(req: GetUserInfoRequest) {
        val reqByte = req.toByteArray()
        sendNetworkRequest(reqByte, NetWorkUrl.GetUserInfoUserInfo)
    }

    fun  setUnBlock(req: UnBlackRequest){
        sendNetworkRequest(req.toByteArray(),
            NetWorkUrl.UnBlack )
    }

    fun  setBlock(req: BlackRequest){
        sendNetworkRequest(req.toByteArray(),
            NetWorkUrl.Black )
    }
    fun  setReport(req: ReportRequest){
        sendNetworkRequest(req.toByteArray(),
            NetWorkUrl.Report )
    }


    fun getGiftWall(uid:Long){
        sendNetworkRequest(GetGiftWallRequest.newBuilder().setUid(uid).build().toByteArray(),NetWorkUrl.GetGiftWall)
    }
}